home *** CD-ROM | disk | FTP | other *** search
- xps.1.1
-
- def c0, 0.3, 0.3, 0.3, 0.0 ;ambient light color
- def c1, 1.0, 1.0, 1.0, 0.0 ;light color
-
- tex t0 ;Sample base map
- tex t1 ;Sample normal map
- tex t2 ;Sample gloss map
-
- dp3 r1, t1_bx2, v1_bx2 ;half vector dot normal
-
- ;exp specular
- mul r1, r1_sat, r1_sat // 2
- mul r1, r1, r1 // 4
- mul r1, r1, r1 // 8
- ;mul r1, r1, r1 // 32
-
- mul r1, r1, t2
-
- dp3 r0, t1_bx2, v0_bx2 ;N dot L for Light1 - normal shading
- mad r0, r0_sat, c1, c0 ;Color for Light1 C3 = dircolor + C2 = ambcolor
-
- mad r0.rgb, r0_sat, t0, r1_sat
-
- ;special combiner instruction so the combiner dont add oD1 to the output (we got the halfvector there)
- xfc fog.a, r0_sat, fog.rgb, zero, zero, zero, r0.a
-